#ifndef _CHARACTER_NET_H_
#define _CHARACTER_NET_H_

#include "character.h"
#include "g_socket.h"

class BasePacket
{
public:
	int ID;
};

enum {PACKET_ID_POS_NAME, PACKET_ID_KICK_PLAYER, PACKET_ACTION, MONSTER_POS, MONSTER_ACTION};

class Packet_Action: public BasePacket
{
public:
	//char Name[32];
	UniqueID CurID;
	int ActionID;
	Packet_Action();
};

class Packet_Kick_Player: public BasePacket
{
public:
	//char Name[32];
	UniqueID CurID;
	Packet_Kick_Player();
};

class Packet_Pos_Name: public BasePacket
{
public:
	float X,Y;
	float Dir;
//	char Name[32];
	UniqueID CurID;
	Packet_Pos_Name();
};

class Monster_Pos: public BasePacket
{
public:
	float X,Y;
	float Dir;
//	int ActionID;
//	char Name[32];
	UniqueID CurID;
	Monster_Pos();
};

class Monster_Action: public BasePacket
{
public:
	int ActionID;
	UniqueID CurID;
	Monster_Action();
};

class GameClient;
class GameServer;

class CharacterNet : public Character
{
public:
	NetStream CurNS;
public:
	void WorkClient(GameClient&);
	void WorkServer(GameServer&);
	void StartServer(NetListener&);
	void StartConnect();
	void StartServer();
};

#endif